#ifndef ERROR_MESSAGE_H
#define ERROR_MESSAGE_H

#include <QObject>
#include <QString>

class QWidget;

class ErrorMessage : public QObject
{
    Q_OBJECT

public:
    explicit ErrorMessage(QObject *parent = nullptr);

    void showError(QWidget *parent, const QString &message);
    void showWarning(QWidget *parent, const QString &message);
    void showInfo(QWidget *parent, const QString &message);

    QString getLastError() const { return lastError; }

private:
    QString lastError;
};

#endif // ERROR_MESSAGE_H
